package cn.gson.fengboot.model.service;

import cn.gson.fengboot.model.dao.LwxgcDao;
import cn.gson.fengboot.model.mapper.LwxgcMapper;
import cn.gson.fengboot.model.pojos.Lwxgc;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(rollbackFor = Exception.class)
public class LwxgcService {
    @Autowired
    LwxgcDao lwxgcDao;
    @Autowired
    LwxgcMapper lwxgcMapper;


    //新增
    @Transactional(transactionManager = "transactionManager")
    public  void addwxgc(Lwxgc lwxgc){
        lwxgcDao.save(lwxgc);
    }

    //查询
    public List<Lwxgc> wxgccx(Integer gcbid){
        return lwxgcMapper.wxgccx(gcbid);
    }
}
